﻿using System;

namespace Z.IconLibraryGenerator.WinForm
{
    public partial class ProjectConfiguration
    {
        public static ProjectConfiguration Load(string file)
        {
            try
            {
                string s = file.ToFileInfo().ReadToEnd();
                var projectConfiguration = s.DeserializeXml<ProjectConfiguration>();

                return projectConfiguration;
            }
            catch (Exception)
            {
                return null;
            }
        }
    }
}